<?
$id=$_GET[id];
$count=$_POST[count];
if ($id==""){
	for ($i = 1; $i <= $count; $i++) 
	{
	$id= $_POST[industry.$i];
	if($id!=""){break;}
	}
}
if ($id!="")
{
$qr1=mysql_query("select * from tbcomment where comment_id='$id'"); 
$rowedit=mysql_fetch_array($qr1);
$lienhe_hoten=$rowedit['comment_hoten'];
$lienhe_email=$rowedit['comment_email'];
$lienhe_phone=$rowedit['comment_phone'];
$lienhe_noidung=$rowedit['comment_noidung'];
$lienhe_date=$rowedit['comment_date'];
$lienhe_trangthai=$rowedit['comment_trangthai'];

$tintuc_id=$rowedit['tintuc_id'];
$sql=mysql_query("select *from tbsanpham where sanpham_id='$tintuc_id'");
$row=mysql_fetch_array($sql);
$tieude=$row['sanpham_tieude'];
$alias=$row['sanpham_alias'];
$sanphamid=$row['sanpham_id'];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding:10px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td class="bg_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><img src="images/icon-48-menumgr.png" width="48" height="48" /></td>
                <td width="45%" class="mana_title"> Chi tiết Comment</td>
                <td width="50%" align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="90%">&nbsp;</td>
                      <td class="icon_style"><a href="#"><img src="images/icon-32-help.png" width="32" height="32"  border="0"/><br />
                      Tr&#7907; gi&uacute;p</a></td>
                    </tr>
                  </table>
                  </td>
              </tr>
            </table></td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="7"></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td bgcolor="#fbfbfb"><form id="frmdanhsach" name="frmdanhsach" method="post" action="index.php?progid=17&comment=xuly" onsubmit="return validate_form(this);">
            <input type="hidden" id="id" name="id" value="<?=$id?>"  />
              <table width="100%" border="0" cellspacing="2" cellpadding="2">
                <tr>
                  <td valign="top" style="padding-left:15px; width:64%"><fieldset id="fieldsearch2" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Chi tiết liên hệ</span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                  <tr>
                        <td align="right" width="25%" class="bg_form_left">Tên sản phẩm</td>
                        <td class="bg_form_right"><a target="_blank" href="<?php echo $url_main_site; ?><?php echo $alias?>-<?php echo $sanphamid ?>.html"><?php echo $tieude ?></a>                        </td>
                      </tr>
                  
                      <tr>
                        <td align="right" width="25%" class="bg_form_left">Họ và tên </td>
                        <td class="bg_form_right"> <?=$lienhe_hoten?>                        </td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Email</td>
                        <td  class="bg_form_right"><?=$lienhe_email?></td>
                      </tr>
                      <tr>
                        <td align="right" valign="top" class="bg_form_left">Tiêu đềs</td>
                        <td  class="bg_form_right"><?=$lienhe_phone?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Nội dung</td>
                        <td class="bg_form_right"><?=$lienhe_noidung?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Ngày gửi</td>
                        <td align="left" >
                          <?=$lienhe_date?></td>
                      </tr>
                      
                      <tr>
                        <td align="right" class="bg_form_left">Duyệt</td>
                        <td align="left" >
                          <input type="radio" name="txtstatus" id="txtstatus" value="0" <? if($lienhe_trangthai==0){?> checked="checked"<? }?> />
                          Không
                          <input name="txtstatus" type="radio" id="txtstatus" value="1" <? if($lienhe_trangthai==1){?> checked="checked"<? }?> />
                          Có</td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left"><input type="submit" name="submit" id="submit" value="Cập nhật" /></td>
                        <td align="left" >
                          <input type="reset" name="Reset" id="button" value="Nhập lại" />                        </td>
                      </tr>
                    </table>
                  </fieldset></td>
                  <td></td>
                  <td  valign="top" style="padding-right:15px; width:35%"><fieldset id="fieldsearch" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Thông tin liên hệ</span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                    <tr>
                      <td colspan="2"></td>
                      </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                  </fieldset></td>
                </tr>
              </table>
              
                        </form>
            </td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
</table>
<? }?>